﻿using log4net.Core;
using System;
using System.Collections.Generic;

namespace TransferPost.Beans
{

    /// <summary>
    /// 先用来看看
    /// </summary>
    public class RtnBean
    {
        public int status;

        public Dictionary<string, object> par = new Dictionary<string, object>();
    }

    public class SVNCheckBean
    {
        public SVNCheckBean(string p)
        {
            path = p;

            modify_count = 0;
            nonversioned_count = 0;
            add_count = 0;
            del_count = 0;

            necessary_modify_count = 0;
            necessary_nonversioned_count = 0;
            necessary_add_count = 0;
            necessary_del_count = 0;

            Selected = true;
        }

        public bool Selected { get; set; }

        public string path { get; set; }

        // 修改的文件个数
        public int modify_count;

        // 尚未添加到SVN的个数
        public int nonversioned_count;

        // 新增未提交的个数
        public int add_count;

        // 删除未提交的个数
        public int del_count;

        // 修改的文件个数
        public int necessary_modify_count;

        // 尚未添加到SVN的个数
        public int necessary_nonversioned_count;

        // 新增未提交的个数
        public int necessary_add_count;

        // 删除未提交的个数
        public int necessary_del_count;
    }

    /// <summary>
    /// 长
    /// </summary>
    public class MsgBean
    {
        // 偷懒，直接用这个，表明提示信息的重要程度
        public Level MsgType = Level.Info;

        public string msg;

        public MsgBean(Level l, string m)
        {
            this.MsgType = l;
            this.msg = m;
        }

        public MsgBean(string m)
        {
            this.msg = m;
        }
    }




    public class FSNode
    {
        public ulong FRN;
        public ulong ParentFRN;
        public string FileName;
        public bool IsSvn;

        public FSNode(ulong lFRN, ulong lParentFSN, string sFileName, bool lIsSvn)
        {
            FRN = lFRN;
            ParentFRN = lParentFSN;
            FileName = sFileName;
            IsSvn = lIsSvn;
        }
    }

    [Serializable]
    public class SVNProjectInfo
    {
        public string ProjectGuid;
        public string SVNPath;
        public string ProjectName;

        public string DirectoryName;

        public DateTime LastUpdateTime;

        public DateTime InitTime;

        // 上次更新之后，记录的版本号
        public int LastUpadateVersion;

        public bool IsZuoFei;
    }

    public class frmInfo
    {
        public string frmGuid;

        public string frmName;

        public string frmNo;
        internal Type frmType;
    }
}
